<template>
  <div class="giftcards">
        <header class="mui-bar mui-bar-nav">
            <img src="login/1.png" @click="fun">
            <h1 class="mui-title">选择礼品卡</h1>
            <span>历史记录</span>
        </header>
        <div>
            <div class="top">
                <div class="button">
                    <router-link to="/newest"><div class="hot">最热</div></router-link>
                    <router-link to="/all"><div class="all">全部</div></router-link>
                </div>
            </div>
        </div>
        <router-view></router-view>
  </div>
</template>

<script>
export default {
    components:{
    },
    created(){
        this.$router.push("/newest")   
    },
    methods:{
        fun(){
            this.$router.push("/Twoa")
        }
    }
    
}
</script>

<style scoped>
    .giftcards{
        background-color: #f5f5f5;
    }
    header{
    display: flex;
    height: 0.55rem;
    font-size: 0.16rem;
    width: 100%;
    background-color: #f5f5f5;
    padding: 0.12rem 0;
    text-align: center;
    }
    header img{
        height: 0.34rem;
        position: absolute;
    }
    header h1{
        font-size: 0.16rem;
        line-height: 0.34rem;
        margin: auto;
        font-weight: 700;
        height: 0.34rem;
        display: inline;
    }
    header span{
        font-size: 0.12rem;
        line-height: 0.34rem;
        position: absolute;
        right: 0.1rem;
    }
    .router-link-active{
        background-color: white;
        color: #7085c6;
        width: 1.76rem;
        height: 0.3rem;
        margin-top: 0.03rem;
        border-radius: 0.15rem;
        line-height: 0.35rem;
    }
    .hot,.all{
        width: 1.76rem;
        height: 0.3rem;
        margin-top: 0.03rem;
        line-height: 0.35rem;
        border-radius: 0.15rem;
        text-align: center;
    }
    .top{
        position: relative;
        width: 3.58rem;
        height: 0.45rem;
        margin: auto;
        line-height: 0.45rem;
        border-radius: 0.15rem;
    }
    .button{
        display: flex;
        justify-content: space-between;
        position: absolute;
        width: 3.58rem;
        height: 0.37rem;
        background-color: #7085c6;
        border-radius: 0.15rem;
    }
</style>